made profile photo optional and fixed profile factory