code from whiteboard added