moved resource management to database