working fine until this point