refatored my test