profile working from database