not working, skeleton code and pseudo code