Merged Alex' changes