adding coerce code
finishing up code