did I code this right?