refactored rook a bit