java script for the profile picker is done