updated code
gotten it working