working, just need additional checks for valid coords and entities