Implemented windows related functions