changed positioning code