fixed c89 compatibility and added description