need to implement sorting and modal