fixed the function which runs code on tryapl