code working, could use testing