Populated skeleton function with actual codes