Added a separate function for profile pic insertion.