starts to implement map logic