Simplified code for basic function

Has structure to be developed