merging alexyorke's changes