found source of error for jp's bounce code and changed the place and which the type checking occurs for JP's sake even though it doesn't matter