fixing placing code