cleaned up code #4