added grid creation
refactored position