added spec and finished coding